package cn.wangyaying.util;

import java.awt.Image;

import java.awt.image.BufferedImage;

import java.io.IOException;

import java.net.URL;

import javax.imageio.ImageIO;;

/**
 *  * 游戏开发中常用的工具类(比如：加载图片等方法)  *   * @author wangyaying  *   
 */
public class Picture {

	public static Image getImage(String path) {
		URL u = Picture.class.getClassLoader().getResource(path);
		BufferedImage img = null;
		try {
			img = ImageIO.read(u);
		} catch (IOException e) {
			e.printStackTrace();
		}
		return img;
	}
}
